﻿Imports Entidad
Imports Datos
Imports System.Data.SqlClient
Imports System.Data

Public Class DocumentoClienteDetalleNegocio

    Dim dao As New DocumentoClienteDetalleDatos

    Function obtenerDetallePedidoXART(codArticulo As String, ByVal codPedido As String, tipoDOC As String, codSucursal As String, codCia As String) As DataSet
        Return dao.obtenerDetallePedidoXART(codArticulo, codPedido, tipoDOC, codSucursal, codCia)
    End Function

    Function obtenerDetallePedido(ByVal codPedido As String, tipoDOC As String, codSucursal As String, codCia As String, activo As String) As DataSet
        Return dao.obtenerDetallePedido(codPedido, tipoDOC, codSucursal, codCia, activo)
    End Function

    Function listarDetallePendienteAsignar(cia As String, suc As String, tipoDOC As String, ByVal codPedido As String) As DataSet
        Return dao.listarDetallePendienteAsignar(cia, suc, tipoDOC, codPedido)
    End Function

    Sub dismuinuirCantidadDetalle(ByVal cant As String, ByVal codPed As String, ByVal codPDD As String, tipoDOC As String)
        dao.dismuinuirCantidadDetalle(cant, codPed, codPDD, tipoDOC)
    End Sub

    Sub aumentarCantidadDetalle(ByVal pdp As PedidoDetallePickeador, tipoDOC As String)
        dao.aumentarCantidadDetalle(pdp, tipoDOC)
    End Sub

    Function obtenerUltimoCodigoDetalle(ByVal codPed As String, tipoDOC As String) As Integer
        Return dao.obtenerUltimoCodigoDetalle(codPed, tipoDOC)
    End Function

    Function verificarAsignarDetalle(codPedido As String, tipoDOC As String, codSucursal As String, codCia As String) As Boolean
        Return dao.verificarAsignarDetalle(codPedido, tipoDOC, codSucursal, codCia)
    End Function

    Sub registrarDocumentoReboteDetalle(codDocumento As String, codPedido As String)
        dao.registrarDocumentoReboteDetalle(codDocumento, codPedido)
    End Sub

    Sub registrarDocumentoReboteDetalle(codDocumento As String, codPedido As String, codDetalle As String, cantidad As String)
        dao.registrarDocumentoReboteDetalle(codDocumento, codPedido, codDetalle, cantidad)
    End Sub

    Sub registrarDocumentoClienteDetalleRelacion(codPedido As String, codDocumento As String)
        dao.registrarDocumentoClienteDetalleRelacion(codPedido, codDocumento)
    End Sub

    Sub registrarDocumentoClienteDetalleRelacion(relacion As DocumentoClienteDetalleRelacion)
        dao.registrarDocumentoClienteDetalleRelacion(relacion)
    End Sub

    Sub registrarDocumentoClienteDetalle(detalle As PedidoDetalle)
        dao.registrarDocumentoClienteDetalle(detalle)
    End Sub

    Sub actualizarDocumentoClienteDetalle(detalle As PedidoDetalle)
        dao.actualizarDocumentoClienteDetalle(detalle)
    End Sub

    Function obtenerStockXDetalle(codArticulo As String) As Decimal
        Return dao.obtenerStockXDetalle(codArticulo)
    End Function

End Class
